import 'package:flutter/material.dart';
import 'package:flutter_app_radial_progress/graph.dart';

import 'graph_data.dart';


class ShowGraph extends StatefulWidget {
  @override
  _ShowGraphState createState() => _ShowGraphState();
}

class _ShowGraphState extends State<ShowGraph> with SingleTickerProviderStateMixin{

  AnimationController _graphAnimationController;

  @override
  void initState() {
    _graphAnimationController =
        AnimationController(vsync: this,duration: Duration(seconds: 1));
    super.initState();
  }

  @override
  void dispose() {
    _graphAnimationController.dispose();
    super.dispose();
  }
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Container(
            alignment: Alignment.center,

            child: InkWell(
              onTap: (){
                _graphAnimationController.forward();
              },
              child: Graph(
                  animationController: _graphAnimationController,
                  height:100.0,graphDatas: weekData,)
            ),
          ),
        ),
    );
  }
}
